package com.keensense.vcm.model;

import com.keensense.vcm.model.enums.TypeCodeEnum;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;

/**
 * @author lanjian
 * @date 2020/8/26
 */
@XmlRootElement(name = "request")
public class GetDataDictionaryRequest {

    private GetDataDictionaryRequest() {
    }

    public GetDataDictionaryRequest(TypeCodeEnum typeCode) {
        List<TypeCodeEnum> typeCodes = new ArrayList<>(1);
        typeCodes.add(typeCode);
        this.typeCodes = typeCodes;
    }

    private List<TypeCodeEnum> typeCodes;

    @XmlElementWrapper(name = "typeCodes")
    @XmlElement(name = "typeCode")
    public List<TypeCodeEnum> getTypeCodes() {
        return typeCodes;
    }

    public void setTypeCodes(List<TypeCodeEnum> typeCodes) {
        this.typeCodes = typeCodes;
    }
}
